package com.yigo.prc.gateway.controller;

import com.yigo.framework.http.Q;
import com.yigo.framework.http.R;
import com.yigo.prc.api.spu.PrcSpuFeign;
import com.yigo.prc.api.spu.command.CreateSpuCmd;
import com.yigo.prc.app.service.PrcSpuAppService;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author chenzl
 */
@RestController
public class PrcSpuController implements PrcSpuFeign {
    @Resource
    private PrcSpuAppService prcSpuAppService;

    @Override
    public R createSpu(Q<CreateSpuCmd> q) {
        prcSpuAppService.createSpu(q.getNonNullParams());
        return R.ok();
    }
}
